package io.renren.modules.app.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import io.renren.common.utils.PageUtils;

import io.renren.modules.app.entity.AppPayEntity;
import io.renren.modules.app.service.AppPayService;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @Program: renren-fast
 * @Package: io.renren.modules.mynj.service.impl
 * @ClassName: AppPayServiceImpl
 * @Description: app支付服务接口实现类
 * @Author: ShenPengPeng
 * @CreateDate: 2018-11-07 09:20
 * @Version: 1.0
 */
@Service("appPayService")
public class AppPayServiceImpl implements AppPayService {
    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<AppPayEntity> page = new Page<>();
        List<AppPayEntity> appPayEntities = new ArrayList<>();
        AppPayEntity appPayEntity = null;
        appPayEntity = new AppPayEntity();
        appPayEntity.setId("1");
        appPayEntity.setKey("cs_xnyqc");
        appPayEntity.setPayMentType("微信");
        appPayEntities.add(appPayEntity);

        appPayEntity = new AppPayEntity();
        appPayEntity.setId("2");
        appPayEntity.setKey("cs_myde");
        appPayEntity.setPayMentType("支付宝");
        appPayEntities.add(appPayEntity);

        appPayEntity = new AppPayEntity();
        appPayEntity.setId("3");
        appPayEntity.setKey("cs_sz");
        appPayEntity.setPayMentType("已支付");
        appPayEntities.add(appPayEntity);

        appPayEntity = new AppPayEntity();
        appPayEntity.setId("4");
        appPayEntity.setKey("cs_njnk");
        appPayEntity.setPayMentType("微信|支付宝|已支付");
        appPayEntities.add(appPayEntity);

        page.setRecords(appPayEntities);
        page.setTotal(36);



        return new PageUtils(page);
    }

    @Override
    public void deleteBatch(String[] ids) {
        for(String s:ids){
            System.out.println(s);
        }
    }
}
